package com.tanhua.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.db.Freeze;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

public interface FreezeMapper extends BaseMapper<Freeze> {
    @Select("SELECT * FROM `tb_freeze` where user_id = #{uid}")
    Freeze selectByUid(Long uid);

    @Select("SELECT TIMESTAMPDIFF(SECOND, #{currentDate}, #{unfreezeDate})")
    Long selectFreezeTimeDifference(Date currentDate, Date unfreezeDate);
}
